Dynomotion

Group: DynoMotion Message: 11131 From: timbosaurus Date: 2/25/2015
Subject: oscillation after disable/enable servo drivers

Hi,


I've got the servo tuning on the mill pretty good now (well, OK for an amateur anyway...), but there is one thing that's not right.


I first config the kflop speeds/PID/etc and enable the axes with my init file, then I set the kflop output to enable the drives and everything works fine.  Movement is fast, overshoot is minimal, following error is low and I'm a happy chappy.


But If I disable the drivers for any reason and then re-enable them, all three axes oscillate violently until I e-stop or kflop disables the axes due to following error.


I'm assuming that with the drives disabled, kflop trys to servo, ends up way off target, and then all hell breaks loose when the drives are re-enabled and it tries to correct?


So my questions are:

1) if motion is fine with my settings in all other situations (I've run hours of g-code), why do you think this particular situation would cause violent oscillations.  I mean, isn't it just another requested motion?


2) Should I try to tune this oscillation out somehow, or simply write some code to prevent it from happening through design (eg: if the kflop output controlling the driver is off axes are disabled and vice versa).  I'm worried about the code strategy, because I don't understand why it does it, so it's possible it could happen some other way.


Thanks,

Tim

Group: DynoMotion Message: 11132 From: Tom Kerekes Date: 2/26/2015
Subject: Re: oscillation after disable/enable servo drivers
Hi Tim,

That is pretty much to be expected.  If the drives are disabled without disabling the KFLOP Axis Channels the Servo will continue to attempt to correct any errors.  This is likely to cause the output to ramp up to a huge value.  This is often referred to as "Integrator Wind Up".  When the Drive is re-enabled there is likely to be a large violent reaction that puts the amplifier into a non-linear, saturated mode resulting in large overshoot and oscillation.  This is much different than a normal move along a controlled trajectory where following errors and drive output are relatively small and controlled.  

You can sometimes minimize the violent reaction by setting Max Output, Max Integrator, and Max Error to smaller values.  But these need to be big enough to allow normal operations so it may not be possible to completely avoid the problem.

Also setting Max Following Error to a small value will usually disable the KFLOP Axis at the beginning of any significant overshoot to avoid any violent reaction.

But the best approach is the one you suggest which is to inform KFLOP that the Drives are disabled and have a small C Program to detect this and disable the KFLOP Axis Channels. 

HTH
Regards
TK

Group: DynoMotion Message: 11133 From: az@aimele.com Date: 2/26/2015
Subject: Re: oscillation after disable/enable servo drivers
What do you think of simply reducing the K flop Pgain to 10% of normal  when disabling the drives then ramping the P gain back to normal over the course of about 0.5 seconds after re-enabling.

AZ



------- Original Message -------
From : Tom Kerekes tk@... [DynoMotion][mailto:DynoMotion@yahoogroups.com]
Sent : 2/26/2015 12:19:46 PM
To : DynoMotion@yahoogroups.com
Cc :
Subject : RE: Re: [DynoMotion] oscillation after disable/enable servo drivers

 

Hi Tim,

That is pretty much to be expected.  If the drives are disabled without disabling the KFLOP Axis Channels the Servo will continue to attempt to correct any errors.  This is likely to cause the output to ramp up to a huge value.  This is often referred to as "Integrator Wind Up".  When the Drive is re-enabled there is likely to be a large violent reaction that puts the amplifier into a non-linear, saturated mode resulting in large overshoot and oscillation.  This is much different than a normal move along a controlled trajectory where following errors and drive output are relatively small and controlled.  

You can sometimes minimize the violent reaction by setting Max Output, Max Integrator, and Max Error to smaller values.  But these need to be big enough to allow normal operations so it may not be possible to completely avoid the problem.

Also setting Max Following Error to a small value will usually disable the KFLOP Axis at the beginning of any significant overshoot to avoid any violent reaction.

But the best approach is the one you suggest which is to inform KFLOP that the Drives are disabled and have a small C Program to detect this and disable the KFLOP Axis Channels. 

HTH
Regards
TK

Group: DynoMotion Message: 11134 From: Tom Kerekes Date: 2/26/2015
Subject: Re: oscillation after disable/enable servo drivers
Hi AZ,

That shouldn't even be necessary.  When the axis is enabled the target destination should be set to the current position.  In that case the servo should simply remain in position without any violent jump.

Regards
TK

Group: DynoMotion Message: 11135 From: timbosaurus Date: 2/26/2015
Subject: Re: oscillation after disable/enable servo drivers
Awesome. Good to know that it's the norm, and not something retarded that I have done in the tuning. I'll manage it thru software as suggested.

The machine is working so well now, I just love the whole dynomotion system!

I'm bidding on an old CNC lathe at the moment, so I may have a third kflop candidate soon (fingers crossed).

Cheers, Timbo